home *** CD-ROM | disk | FTP | other *** search
- <?php
- /**
- * Web based SQLite management
- * Show navigation into databases
- * @package SQLiteManager
- * @author FrΘdΘric HENNINOT
- * @version $Id: left.php,v 1.17 2004/09/12 18:56:32 freddy78 Exp $ $Revision: 1.17 $
- */
-
- include_once "./include/defined.inc.php";
- include_once INCLUDE_LIB."config.inc.php";
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=<?php echo $charset ?>">
- <link href="theme/<?php echo $localtheme ?>/left.css" rel="stylesheet" type="text/css">
- </head>
-
- <body>
- <div align="center" width=100% style="background: white; padding-top: 5px; padding-bottom: 5px"><img src="theme/default/pics/sqlitemanager.png" border=0></div>
- <div align="center" style="margin-top: 5px">
- <a href="index.php" class="base" target="_parent"><?php echo $traduct->get(1); ?></a>
- </div>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <?php
- $query = "SELECT * FROM database";
- $tabDb = SQLiteArrayFunction($db, $query, SQLITE_ASSOC);
- foreach($tabDb as $ligne){
- echo " <tr valign=\"middle\" class=\"database\">\n
- <td width=\"20\">".displayPics("database".((in_array($ligne["id"], $attachDbList))? "_link" : "" ).".png", "", 0, 20)."</td>\n
- <td><a href=\"index.php?dbsel=".$ligne["id"]."\" target=\"_parent\" class=\"dbsel\">".$ligne["name"]."</a></td>\n
- </tr>\n";
- if($dbsel == $ligne["id"]){
- include_once INCLUDE_LIB."SQLiteDbConnect.class.php";
- $workDb = &new SQLiteDbConnect($ligne["location"]);
- if(is_resource($workDb->connId)){
- echo " <tr valign=\"middle\">
- <td colspan=2 align=\"right\">
- <table width=\"90%\" border=0 cellspacing=0 cellpadding=0>";
- foreach($dbItems as $item){
- $list = $workDb->getPropList($item);
- if(is_array($list) && count($list)) foreach($list as $Name){
- $actionLink = "<a href=\"main.php?dbsel=$dbsel&".strtolower($item)."=".urlencode($Name)."\" target=\"main\" class=\"item\">";
- echo " <tr>";
- echo " <td>".$actionLink.displayPics(strtolower($item)."s.png")."</a></td>";
- echo " <td class=\"item\" nowrap=\"nowrap\">";
- if(($item!="Function") && ($item!="Trigger")) echo "<a href=\"main.php?dbsel=$dbsel&".strtolower($item)."=".urlencode($Name)."&action=browseItem\" target=\"main\">".displayPics("browse.png", "", 0, 10)."</a>";
- else echo displayPics("nobrowse.png");
- echo " ".$actionLink.$Name."</a></td>
- </tr>\n";
- } elseif($displayEmptyItemLeft) {
- $actionLink = "<a href=\"main.php?dbsel=$dbsel&action=add_".strtolower($item)."\" target=\"main\" class=\"item\">";
- echo " <tr>
- <td width=\"25\">".$actionLink.displayPics(strtolower($item)."s.png")."</a></td>
- <td class=\"".strtolower($item)."\" nowrap=\"nowrap\">".displayPics("nobrowse.png")." ";
- if(!$workDb->isReadOnly() && displayCondition("properties")) echo $actionLink."+ ".$itemTranslated[$item]."</a></td>";
- else echo "<span class='item'><i>+ ".$itemTranslated[$item]."</i></span>";
- echo " </tr>\n";
- }
- }
- echo " </table>
- </td>
- </tr>";
- }
- }
- }
- echo " </table>
- </body>
- </html>\n";
- if(isset($workDb) && $workDb->connId && ($workDb->baseName!=":memory:")) {
- $workDb->close();
- @sqlite_close($db);
- }
- ?>
-